package cz.mendelu.swi2.catalogOfRobots;

import java.util.ArrayList;

import cz.mendelu.swi2.skladDilu.Part;


/**
 * @author xvacula, xsafar1, xsmid
 * @version 1.0
 * @created 10-5-2012 9:35:57
 */
public class Robot {

	private String description;
	private int id;
	private String name;
	private ArrayList<Part> parts;
	private String version;
//	public RobotRepository is load in;

	public void finalize() throws Throwable {

	}

	public void Robot() {
		this.id = 0;
	}
	//getters
	public String getDescription(){
		return description;
	}
	
	public int getId(){
		return id;
	}

	public String getName(){
		return name;
	}
	
	public String getVersion(){
		return version;
	}

	//parts handlers
	public ArrayList<Part> getParts(){
		return parts;
	}

	public void addPart(Part part){
		parts.add(part);
	}

	public boolean removePart(Part part){
		return parts.remove(part);
	}
	
	//setters
	public void setDescription(String description){
		this.description = description;
	}

	public void setId(int id){
		this.id = id;
	}

	public void setName(String name){
		this.name = name;
	}
	
	public void setVersion(String version){
		this.version = version;
	}
}